home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1996 July: Mac OS SDK / Dev.CD Jul 96 SDK / Dev.CD Jul 96 SDK2.toast / Development Kits (Disc 2) / QuickDraw GX / Programming Stuff / Sample Code / Printing Samples / Printer Drivers… / Generic LW "30 sec Alert" / ChooserSupport.r < prev    next >
Encoding:
Text File  |  1995-04-10  |  3.5 KB  |  152 lines  |  [TEXT/MPS ]

  1. /*
  2.     ChooserSupport.r - other resources needed in order for driver to work
  3.     with the Chooser.
  4.     
  5.     3/22/94 - dmh - Updated for the b4 seed.
  6.    12/18/93 - dmh - Updated for the b3 seed.
  7.     9/13/93 - dmh - Updated for the b2 seed.
  8.     
  9.     Copyright © 1992-1994 Apple Computer, Inc.
  10.     All rights reserved.
  11. */
  12.  
  13. #include "Types.r"
  14. #include "SysTypes.r"
  15. #include "PrintingResTypes.r"
  16.  
  17. //--------------------------------------------------------------------------------------------
  18. // THINGS TO CONTROL THE DEFAULT CHOOSING MECHANSIM
  19. //--------------------------------------------------------------------------------------------
  20.  
  21. // what type of communication does this device use (this is the default, as the actual
  22. // value can be found in the desktop printer).
  23. resource 'look' (-4096, sysheap, purgeable) {
  24.     1,                // use the first in our list by default
  25.     
  26.     {
  27.     "AppleTalk",    -4096,        isAppleTalk,                "LaserWriter";
  28.     "Servers",        -4095,        isAppleTalk+isPrinterShare,    "LaserWriterIS";
  29.     "Serial",        -4094,        iconCells,                    "Modem Port";
  30.     };
  31. };
  32.  
  33.  
  34. resource 'comm' (-4096, sysheap, purgeable) {
  35.     PAP
  36.         {
  37.         8,
  38.         "",
  39.         0, 0, 0, 0
  40.         };
  41. };
  42.  
  43. resource 'comm' (-4095, sysheap, purgeable) {
  44.     PrinterShare
  45.         {
  46.         "",
  47.         0
  48.         };
  49. };
  50.  
  51. resource 'comm' (-4094, sysheap, purgeable) {
  52.     Serial
  53.         {
  54.         baud57600,        /* Output baud rate */
  55.         noParity,        /* Output parity */
  56.         oneStop,        /* Output stop bits */
  57.         data8,            /* Output data size */
  58.         0x00010000,        /* Output handshaking */
  59.         0x00000000,
  60.         baud57600,        /* Input baud rate */
  61.         noParity,        /* Input parity */
  62.         oneStop,        /* Input stop bits */
  63.         data8,            /* Input data bits */
  64.         0,                /* Input handshaking */
  65.         0,
  66.         1024,            /* Input buffer size */
  67.         ".AIn",            /* Input driver name */
  68.         ".AOut"            /* Output driver name */
  69.         };
  70. };
  71.  
  72.  
  73.  
  74. //--------------------------------------------------------------------------------------------
  75. // STANDARD CHOOSER PACK STUFF
  76. //--------------------------------------------------------------------------------------------
  77.  
  78. // NBP Lookup type (maxed out so resource file won't need updating)
  79. resource 'STR ' (-4096, sysheap, purgeable)
  80. {
  81.     "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX";
  82. };
  83.  
  84. // NBP timeout value
  85. type 'GNRL'
  86. {
  87.     byte;    // timeout
  88.     byte;    // retries
  89. };
  90.  
  91. resource 'GNRL' (-4096, sysheap, purgeable)
  92. {
  93.     11,
  94.     5
  95. };
  96.  
  97. // title string (we put the pop-up control here, so we don't want a title)
  98. resource 'STR ' (-4091, sysheap, purgeable)
  99. {
  100.     "";
  101. };
  102.  
  103. // "left" button title
  104. resource 'STR ' (-4093, sysheap, purgeable)
  105. {
  106.     "Create";
  107. };
  108.  
  109. // rectangle list
  110. resource 'nrct' (-4096, sysheap, purgeable) {
  111.     {
  112.     {112, 251, 132, 311};            // left button
  113.     {0,0,0,0};                        // right button
  114.     {-101, 180, -101+20, 400};        // on button (location of device list - popup is placed here)
  115.     {0,0,0,0};                        // off button
  116.     {0,0,0,0};                        // button label
  117.     };
  118. };
  119.  
  120. // Menu used to select between direct connect, AppleTalk, and Servers
  121. resource 'MENU' (-4096, sysheap, purgeable)
  122. {
  123.     -4096,
  124.     textMenuProc,
  125.     0xFFFFFFFF,    
  126.     enabled,
  127.     "",
  128.     {
  129.     }
  130. };
  131.  
  132. // Pop-up control used to select between direct connect printers and those being shared on the network
  133. resource 'CNTL' (-4096, sysheap, purgeable)
  134. {
  135.     {0, 0, 20, 213},                            // zero based control location
  136.     0,                                            // Title options 0 = Left justified
  137.     visible,                                    // Should we display the control?
  138.     95,                                            // Title Width
  139.     -4096,                                        // 'MENU' to display
  140.     popupMenuCDEFproc+popupFixedWidth,            // CDEF = CDEFID * 16 + varCode
  141.     0,                                             // refCon = ResType to append = None
  142.     "Connect via:"                                // Control title
  143. };
  144.  
  145. resource 'DITL' (-4096, sysheap, purgeable) 
  146. {
  147.     {
  148.         {3, 238, 23, 238 + 213}, 
  149.             Control {enabled, -4096},
  150.     };
  151. };
  152.